/***************************************************************************
                        drawing.h  -  Part of gltris
                             -------------------
    begin                : March 2001
    copyright            : (C) 2001 by David Delbecq (Alias Tchize)
    email                : david.delbecq@usa.net
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/****************************************************************************
* See associated .c file for functions description.                         *
****************************************************************************/
#ifndef _drawing_h_
#define _drawing_h_
#include "defs.h"
#include "game.h"
#include "objects.h"
#include "mirrors.h"
extern GLfloat rtri;
#define CamMiddle 3
extern GLfloat CamDelta;
extern GLfloat Camdist;
extern GLfloat CamSpeed;
extern GLuint Texture;
extern GLuint BoxList[MaxSquares];
extern int windoww;
extern int windowh;
extern int isFullScreen;

typedef struct
        {
        glowobj Thunder; // for the thunder
        sparkobj Thunderized;
        int Thunderizedcount;
        lightobj flares[7];
        int keyleft;
        int keyright;
        int keyturnclockwise;
        int keyturncounterclockwise;
        int keydrop;
        int keynextbonus;
        int keyprevbonus;
        int keyusebonus;
        int old_animstep;
        float spotx_alpha;
        float spoty_alpha;
        } *Playerdrawables, TPlayerDrawable;

extern Tdroppingpiece dropped;
extern Playerdrawables Pldraw [2];

//Prototypes
void GraphicalInit ();
void GraphicalClose ();
void DrawBoxAt (GLfloat x, GLfloat y, GLfloat z, GLfloat size, int BoxNbr, int animstep);
void DrawTableAt (TMap table, GLfloat x, GLfloat y, GLfloat z, int animstep, playerobj po);
void display (void);
void display_nocleanup (void);

#endif
